# Maintainer: David Mott <mott.david.j@gmail.com>
# Contributor: Niklas Holm <jadedcyborg@gmail.com>

pkgname='parallel'
pkgver='20180722'
pkgrel='1'
pkgdesc='A shell tool for executing jobs in parallel'
arch=('any')
url='https://www.gnu.org/software/parallel/'
license=('GPL3')
depends=('perl')
source=(
    "https://ftpmirror.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.bz2"{,".sig"}
    "0001-support-MSys2.patch"
)
validpgpkeys=('CDA01A4208C4F74506107E7BD1AB451688888888')
sha256sums=('cf0d421cd78c58741395f94f568c33a0fe409bd5f4bd45f1ae804ec2d32dc318'
            'SKIP'
            '8de30ae24183a0558820314d505eabfef76431340934190f0ef15e4633da80f3')

prepare() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  patch -p1 -i "${srcdir}/0001-support-MSys2.patch"
}

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  ./configure --prefix="/usr"
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}
